# 文件说明：定义计算器视图，负责显示结果和错误信息

def display_result(result):
    if isinstance(result, str) and result.startswith("Error:"):
        print(result)
    else:
        print(f"Result: {result}")

def display_history(history):
    print("历史记录:")
    for i, entry in enumerate(history, start=1):
        print(f"{i}. {entry}")